package com.version1.test.controller;


import com.version1.test.entity.ComparisonList;
import com.version1.test.service.ComparisonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController
@RequestMapping("/comparison")
public class ComparisonController {

    @Autowired
    private ComparisonService comparisonService;

    @GetMapping("/generate")
    public String generateComparisonList() {
        comparisonService.generateComparisonList();
        return "对比名单生成完成。";
    }

    @GetMapping("/alerts")
    public List<ComparisonList> generateAlerts() {
        return comparisonService.generateAlerts();
    }
}